/*
 * Copyright (c) 2017. 深圳一七网络科技. All rights reserved.
 */

package com.fenxiangle.yueding.feature.login.contract;

import com.fenxiangle.yueding.entity.bo.LoginPram;
import com.suozhang.framework.entity.bo.UserInfoBo;
import com.suozhang.framework.framework.BasePresenter;
import com.suozhang.framework.framework.BaseView;

import io.reactivex.Observable;

/**
 * LIJUWEN
 *
 * @email yiyayiyayaoljw@gmail.com
 * @date 2017/4/11 9:06
 */
public interface LoginContract {

    interface Model {
        Observable<UserInfoBo> userThirdLogin(LoginPram registerBo);//第三方登录

        Observable<UserInfoBo> userLogin(LoginPram registerBo);//验证码登陆

        Observable<UserInfoBo> bindPhone(LoginPram registerBo);//绑定手机号

        Observable<LoginPram> sendCode(LoginPram registerBo);//发送验证码
    }

    interface View extends BaseView {
        void showBindReferee(UserInfoBo s);//显示去绑定推荐人

        void showLoginSuccess();//登录成功

        void showBindPhone(UserInfoBo s);//显示去绑定推荐人

        void showCodeSuccess(LoginPram s);//获取验证码成功

        void showError(String error);//显示错误消息

    }


    interface Presenter extends BasePresenter {//

        void userThirdLogin(String openId,
                            int type,
                            Integer sex,
                            String userName,
                            String userHead,
                            String registrationId);

        void userLogin(String mobile, String code,String registrationId);

        void sendCode(String mobile);

        void bindPhone(String userPhone,
                       String code,
                       String userUid);

    }
}
